add error state when !isNumber to Numeric component - #823
Merged
Conversation
Contributor
Author
|
Because NumericInput is the base widget used in all numerics (DualNumeric, derived components) adding validation to it should be working for anywhere there's numerics involved. @dmt0 @nicolaskruchten ready for review |
dmt0
reviewed
Jan 9, 2019
|
|
||
| this.state = {value: props.value}; | ||
| this.state = { | ||
| value: props.value, |
Contributor
There was a problem hiding this comment.
I know this is not a new code addition, but assigning props to state is such an antipattern.
Contributor
Author
There was a problem hiding this comment.
that's our way of not having plotly.js reject the value and override with its default
Contributor
Contributor
Author
Contributor
Author
|
Can I merge this one?
…On Wed, Jan 9, 2019, 3:08 PM Nicolas Kruchten ***@***.*** wrote:
On my screen the little gray fuzzy focus style hides the red...
[image: image]
<https://user-images.githubusercontent.com/203523/50922231-f9d80d00-1417-11e9-879e-be5a3937f4e1.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#823 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AED3JN0H7Hg-nutCT_FQDWIyusjndQl_ks5vBkw9gaJpZM4Z30gQ>
.
|
Contributor
|
same comments as the other validation one: there's no easy "back out to defaults" mode... once it's red it stays red and deleting it doesn't undo... Can we have it accept |
Contributor
Author
Contributor
|
💃 |
VeraZab
force-pushed
the
numerics-error
branch
from
January 10, 2019 02:34
eb8e93f to
9bd9bfd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



closes: #822
same style as in this pr:
#811 (comment)